﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="categoryList.aspx.cs" Inherits="PHTShop.admin.categoryList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <!-- Title -->
    <div id="title" class="b2">
        <h2>
            Category List</h2>
    </div>
    <!-- Title -->
    <div id="listHeader">
        <p>
        </p>
        <div class="listActions">
            <label for="actionSelect">
                With selected items:
            </label>
            <asp:DropDownList ID="DropDownList1" runat="server" CssClass="select" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"
                AutoPostBack="True">
            </asp:DropDownList>
        </div>
    </div>
    <asp:ListView ID="ListView1" runat="server">
        <LayoutTemplate>
            <table cellspacing="0" id="postList" class="listTable">
                <!-- Thead -->
                <thead>
                    <tr>
                        <th class="header">
                            <a title="Post" href="#">Category name</a>
                        </th>
                        <th class="header">
                            <a title="Post" href="#">Order</a>
                        </th>
                        <th class="header">
                            <a title="Author" href="#">Action</a>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                </tbody>
            </table>
        </LayoutTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <a title="Name">
                        <%# Eval("name") %></a>
                </td>
                <td>
                    <asp:TextBox ID="TextBox1" Width="20px" Text=' <%# Eval("Category.orders") %>' runat="server"></asp:TextBox>
                    <asp:RangeValidator ID="RangeValidatorOrder" runat="server" ErrorMessage="*" ControlToValidate="TextBox1"
                        Type="Integer" MinimumValue="1" MaximumValue="1000" Display="Dynamic"></asp:RangeValidator>
                </td>
                <td>
                    <asp:HiddenField ID="HiddenField1" Value='<%# Eval("categoriesId") %>' runat="server" />
                    <asp:LinkButton ID="LinkButton1" OnClick="LinkButton1_Click" ForeColor="BlueViolet"
                        OnClientClick="return confirm('Are you sure')" runat="server">Delete</asp:LinkButton>
                    |
                    <asp:HyperLink ForeColor="BlueViolet" NavigateUrl='<%# "editCategory.aspx?id="+Eval("categoriesId") %>'
                        ID="HyperLink1" runat="server">Edit</asp:HyperLink>
                </td>
            </tr>
        </ItemTemplate>
    </asp:ListView>
    <asp:Button ID="Button1" class="css_btn_class" runat="server" Text="Save" OnClick="Button1_Click" />
    <p>
    </p>
</asp:Content>
